<?php

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

use Acme\UserBundle\Entity\User;

class UserController extends Controller {
  function registerAction()
  {
  	$factory = $this->get('security.encoder_factory');
  	$user = new User();
  	$encode = $factory->getEncoder($user);
  	$password = $encode->encodePassword('ryanpass', $user->getSalt())
  }
}

?>